﻿using System;
using System.Collections.Generic;
using System.Text;

namespace LiuQiuRong.Chat.Infrastructures.Utilities.Models
{
    /// <summary>
    /// 未托管资源释放类
    /// </summary>
    public partial class UnmanagedDispose : IDisposable
    {
        private bool isDisposed = false;
        public UnmanagedDispose() { }

        ~UnmanagedDispose()
        {
            Dispose(false);
        }

        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

        protected virtual void Dispose(bool isDisposing)
        {
            if (!this.isDisposed)
            {
                if (isDisposed) { }
            }

            this.isDisposed = true;
        }
    }
}
